#include "bflb_mtimer.h"
#include "board.h"
#include "bflb_gpio.h"
#include "TM1637.h"

unsigned char num = 0;
unsigned char flag = 0x01;

void setup() {
  board_init();
  TM1637_init();
}

void loop() {
  TM1637_display(num, num+1, num+2, num+3, flag, LEVEL2);
  flag = !flag;
  num += 4;
  bflb_mtimer_delay_ms(2000);
  if(num == 20)
  {
    num = 0;
    TM1637_display(20, 21, 21, 21, flag, LEVEL8);
  }
  bflb_mtimer_delay_ms(2000);
}
